
package com.dkts.oil.web.vo.response;

import com.alibaba.fastjson.JSONObject;
import com.dkts.oil.web.vo.request.SiteSelectionRequest;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.locationtech.jts.geom.Geometry;

import java.util.List;
@Data
@Schema(description = "油库选址方案")
public class AddressPlanResponse {
    @Schema(description = "选址方案集合")
    private PlanItem plans;

    @Schema(description = "油库方案类型")
    @Data
    public static class PlanItem {
        @Schema(description = "转运站")
        private Site zyz;       // 转运站
        @Schema(description = "储备库")
        private Site cbk;       // 储备库
        @Schema(description = "消耗库")
        private Site xhk;       // 消耗库
        @Schema(description = "外场供油中心")
        private Site wcgyzx;    // 外场供油中心
    }

    @Data
    public static class Site {
        @Schema(description = "中心点坐标 [lon, lat]", example = "[120.12, 30.65]")
        private SiteSelectionRequest.AddressPoint centerPoint;

        @Schema(description = "围栏GeoJSON对象")
        private JSONObject bound;

        @Schema(description = "方案名称")
        private String name;

        //离机场中心的 距离
        @Schema(description = "离机场中心的 距离")
        private Double distance;

        //距离机场中心的方向角
        @Schema(description = "距离机场中心的 方向角 0 到 360")
        private Integer bearing;

        //在机场的方向
        @Schema(description = "在机场的方向 东 东南，西南")
        private String direction;

        @JsonIgnore
        private Geometry geometry;
    }
}
